<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/


namespace Member\Model;
use Think\Model;
use \Org\Util\String;

class MemberFeedModel extends Model {
	
	//数据过滤-----------------------------------------------------------------------------------------------
	function FormatData($data=array()){

		$data['content']=String::msubstr($data['content'],0,300,C('S_CHARSET'),false);
		$data['dateline']=NowTime();

		return $data;
	}
	
	//插入数据
	function InsertData($formatdata){
		if ($this->token(false)->create($formatdata)){
			return $this->token(false)->add();
		}
		$this->error=$this->getError();
		return false;
	}
}

?>